$pointer: url('@/assets/images/Pointing.svg'), pointer;
// 加载动画
@keyframes pulse {
  0% { background-color: #f5f5f5; }
  50% { background-color: #e8e8e8; }
  100% { background-color: #f5f5f5; }
}

.videoHistory {
  height: 100%;
  flex: 1;
  padding: 0 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: auto;

  .videoHistoryItem {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;

    &:hover {
      background-color: rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      padding: 16px;
      margin: 0 -16px;
    }

    .videoHistoryHead {
      display: flex;
      align-items: center;
      justify-content: space-between;

      .videoHistoryHeadLeft {
        display: flex;
        align-items: center;
        gap: 19px;

        .videoHistoryTitle {
          line-height: 21px;
          font-size: 20px;
          font-weight: 600;
        }

        .separator {
          width: 1px;
          height: 21px;
          background: rgba(255, 255, 255, 0.2);
        }

        .videoHistoryMeta {
          display: flex;
          color: rgba(255, 255, 255, 0.8);
          gap: 12px;

          .thumbnail{
            padding: 2px;
            background: rgb(41, 42, 44);
            border-radius: 4px;
            display: flex;
            gap: 4px;
            // width: 81px;
            height: 28px;
            align-items: center;
            .img{
              width: 24px;
              height: 24px;
            }
            span{
              line-height: 20px;
            }
          }

          .metaTag {
            padding: 6px 10px;
            background: rgba(100, 100, 100, 0.2);
            border-radius: 4px;
            font-size: 12px;
            line-height: 1;
          }
        }
      }

      .videoHistoryTime {
        color: rgba(255, 255, 255, 0.6);
        font-size: 12px;
      }
    }

    .videoHistoryContent {
      font-size: 14px;
      color: rgba(255, 255, 255, 0.8);
      line-height: 22px;
      // display: flex;
      // align-items: flex-start;
      // gap: 8px;

      .copyIcon {
        width: 16px;
        height: 16px;
        line-height: 0;
        transform: translateY(2px);
        margin-left: 8px;
        cursor: $pointer;
        opacity: 0.7;
        transition: opacity 0.2s ease;

        &:hover {
          opacity: 1;
        }
      }
    }
    .videoPlaceholder {
      height: 630px;
      position: relative;
      cursor: pointer;

      .placeholderBackground {
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        transition: background-color 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;

        // 添加加载动画
        &:not([style*='background-image']) {
          animation: pulse 2s infinite;
        }
      }

      .placeholderContent {
        color: #fff;
        font-size: 16px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        padding: 8px 16px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 4px;
      }
    }

    .videoHistoryActions {
      display: flex;
      gap: 12px;

      .actionButton {
        margin-right: 0px;

        &:last-child {
          margin-right: 0;
          margin-left: auto;
        }

        > button {
          border-radius: 8px;
          transition: all 0.2s ease;

          &:hover {
            opacity: 1;
            transform: translateY(-1px);
          }
        }
      }
    }
  }

  // 空状态样式
  .emptyState {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;

    .emptyIcon {
      width: 48px;
      height: 48px;
      margin-bottom: 16px;
      opacity: 0.5;
    }

    .emptyText {
      text-align: center;
      line-height: 1.5;
    }
  }

  // 加载状态样式
  .loadingState {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;

    .loadingSpinner {
      width: 20px;
      height: 20px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top: 2px solid rgba(255, 255, 255, 0.8);
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin-right: 8px;
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }
      100% {
        transform: rotate(360deg);
      }
    }
  }

  // 响应式设计
  @media (max-width: 768px) {
    padding: 0 16px;

    .videoHistoryItem {
      padding: 12px 0;
      gap: 12px;

      &:hover {
        padding: 12px;
        margin: 0 -12px;
      }

      .videoHistoryHead {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;

        .videoHistoryHeadLeft {
          flex-direction: column;
          align-items: flex-start;
          gap: 8px;

          .separator {
            display: none;
          }

          .videoHistoryMeta {
            flex-wrap: wrap;
            gap: 8px;
          }
        }

        .videoHistoryTime {
          align-self: flex-end;
        }
      }

      .videoHistoryActions {
        flex-wrap: wrap;
        gap: 8px;

        .actionButton {
          flex: 1;
          min-width: 80px;

          &:last-child {
            margin-left: 0;
          }
        }
      }
    }
  }
}
